package com.bdqn.bookshop.common;

/**
 * @author : 罗若然[LUO_RUO_RAN]
 * @date : 2020-07-24 10:57
 * 锁定(1-未锁定 2-已锁定)
 **/
public enum  UserLockedEnum {

    DEFAULT(0, "ERROR"),
    LCKEDO_FALSE(1, "未锁定"),
    LCKEDO_TRUE(2, "已锁定");

    private Integer locked;
    private String name;


    UserLockedEnum(int locked, String name) {
        this.locked = locked;
        this.name = name;
    }

    public static UserLockedEnum getUserLocked(int locked) {
        for (UserLockedEnum userLockedEnum : UserLockedEnum.values()) {
            if (userLockedEnum.getLocked() == locked) {
                return userLockedEnum;
            }
        }
        return DEFAULT;
    }



    public Integer getLocked() {
        return locked;
    }

    public void setLocked(Integer locked) {
        this.locked = locked;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
